package io.github.xyzboom.cj.data

import io.github.xyzboom.cj.decl.CjVariable
import kotlin.js.unsafeCast

/**
 * This may be a little tricky
 */
class IdOnlyVariable(id: Int) : IDebugVariable,
    CjVariable by js("{ variablesReference: 0 }").unsafeCast<CjVariable>() {
    init {
        this.asDynamic().variablesReference = id
    }

    override fun toString(): String {
        return "IdOnlyVariable: {id: $id}"
    }
}